package models

import (
	"gorm.io/gorm"
)

type User struct {
	ID        int    `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;" json:"id"`
	Phone     string `gorm:"column:phone;type:varchar(40);unique;NOT NULL" json:"phone"`
	Sex       int    `gorm:"column:sex;type:int(2); default:0;NOT NULL" json:"sex"`
	NickName  string `gorm:"column:nick_name;type:varchar(255);NOT NULL" json:"nick_name""`
	AvatarUrl string `gorm:"column:avatar_url;type:varchar(255);NOT NULL" json:"avatar_url""`
	gorm.Model
}

func init() {
	//if err := database.Client.AutoMigrate(&User{}); err != nil {
	//	// TODO: skip
	//}
}
